package com.tpp.service.impl;

import com.tpp.dao.IndexRepository;
import com.tpp.pojo.Rotation;
import com.tpp.pojo.baseVo.BaseResult;
import com.tpp.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndexServiceImpl implements IndexService {

    @Autowired
    IndexRepository indexRepository;
    @Override
    public BaseResult index() {
        List<Rotation> all = indexRepository.findAll();

        return new BaseResult(1,"轮播图",all);
    }
}
